#ifndef MOCKCHANMANAGER_H
#define MOCKCHANMANAGER_H

#include <gmock/gmock.h>
#include "chanmanager.h"

namespace MockObjects
{
	class MockChanManager : public Wishmaster::ChanManager
	{
	public:
		MockChanManager()
		{
			m_chanlist = new Wishmaster::ChanList(0);
		}

		virtual ~MockChanManager()
		{
			delete m_chanlist;
		}

		MOCK_METHOD0(initialize, bool());
		MOCK_METHOD0(shutdown, bool());
		MOCK_METHOD1(setImageView, void(ImageViewForm* imageview));
		MOCK_METHOD1(requestFavicon, bool(const QString& chanName));
		MOCK_METHOD3(requestBoardIndex, bool(const QString& chanName, const QString& boardId, int page));
		MOCK_METHOD1(requestThread, bool(const Wishmaster::ThreadId& threadId));
		MOCK_METHOD3(requestThumbnail, bool(const Wishmaster::PostId& postId, int attachmentIndex,
											const QUrl& url));
		MOCK_METHOD2(requestPic, bool(const Wishmaster::PostId& postId, int attachmentIndex));
		MOCK_METHOD3(downloadFile, bool(const Wishmaster::PostId& postId, int attachmentIndex,
										const QString& filename));
		MOCK_METHOD3(addPost, bool(const Wishmaster::ThreadId& threadId, const Wishmaster::PostDescriptor& post, const QString& captcha));
		MOCK_METHOD4(createThread, bool(const QString& chanName, const QString& boardId, const Wishmaster::PostDescriptor& post, const QString& captcha));
		MOCK_METHOD1(requestCaptcha, bool(const Wishmaster::ThreadId& threadId));
		MOCK_METHOD1(setFilterList, void(const Wishmaster::FilterListPtr& list));
		MOCK_CONST_METHOD0(filterList, Wishmaster::FilterListPtr());
		MOCK_METHOD2(refresh, void(bool ignoreOverrides, bool indexOnly));
		MOCK_METHOD0(refreshCurrentBoard, void());
		MOCK_METHOD2(updateContent, void(const QString& chanName, const QString& boardId));
		MOCK_METHOD2(updateContent, void(const Wishmaster::PostId& postId, int attachmentIndex));
		MOCK_METHOD0(collectGarbage, void());
		MOCK_METHOD2(loadChanList, bool(const QString& filename, Wishmaster::AgentFactory* agentFactory));
		MOCK_METHOD2(loadChanList, bool(const QByteArray& filename, Wishmaster::AgentFactory* agentFactory));
		MOCK_METHOD0(updateFavicons, void());
		MOCK_METHOD0(globalFilterList, Wishmaster::FilterListPtr());
		MOCK_METHOD1(setChanlistFilename, void(const QString& filename));
		MOCK_METHOD0(taskhub, Wishmaster::Taskhub*());
		MOCK_CONST_METHOD0(chanwatcher, Wishmaster::ChanWatcher*());
		MOCK_METHOD0(connector, Wishmaster::Connector*());
		MOCK_METHOD1(setThreadStorage, void(Wishmaster::ThreadStorage* storage));
		MOCK_CONST_METHOD0(threadStorage, Wishmaster::ThreadStorage*());
		MOCK_CONST_METHOD0(requestManager, Wishmaster2::Network::RequestManager*());
		MOCK_METHOD0(swap, void());
		MOCK_METHOD1(newMessages, void(const Wishmaster::PostId& thread));

		MOCK_METHOD2(updateAttachment, void(const Wishmaster::PostId& postId, int attachmentIndex));

		MOCK_METHOD2(showPicture, void(const Wishmaster::PostId& postId, int attachmentIndex));

		virtual Wishmaster::ChanList* chanlist() const
		{
			return m_chanlist;
		}

	private:
		Wishmaster::ChanList* m_chanlist;
	};
}

#endif // MOCKCHANMANAGER_H
